package com.lw.sbdemo2.common.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * <p>标题: Servlet初始化监听器</p>
 * <p>描述: </p>
 * <p>版权: Copyright (c) 2018</p>
 * <p>公司: 智业软件</p>
 *
 * @author LinWang
 * @date 2018-05-15 15:47
 */
@Slf4j
@Component
public class ServletInitListener implements ServletContextListener {

    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        if (log.isInfoEnabled()) {
            log.info("Servlet启动初始化监听~");
        }
    }

    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {
        if (log.isInfoEnabled()) {
            log.info("Servlet启动初始化监听~");
        }
    }
}